<?php

header('Content-Type: text/plain charset=utf-8');
try {
    if (isset($_GET['dma'])) {
        $dma = $_GET['dma'];
        $client = new SoapClient('http://172.16.195.14/rtu_service/RTU.svc?wsdl');
        $retval = $client->ReadXml(array("url" => "http://172.16.106.208:8080/WLMADashboard/dmainfradetails.jsp?dma=$dma"));
        foreach ($retval as $t)
            echo $t;
    } else {
        $array = array(
            "Noresult" => "400"
        );
        echo json_encode($array);
    }
} catch (Exception $exc) {
    echo $exc->getTraceAsString();
}
?>